<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link href="${pageContext.request.contextPath}/bootstrap2.3.2/css/bootstrap.min.css" rel="stylesheet" />
    <link href="${pageContext.request.contextPath}/css/Common.css" rel="stylesheet" />
    <link href="${pageContext.request.contextPath}/css/Index2.css" rel="stylesheet" />
    <link href="${pageContext.request.contextPath}/js/bootstrap-datetimepicker-master/css/bootstrap-datetimepicker.css"  />

 <!-- 导入jquery核心类库 -->
<script type="text/javascript"
	src="${pageContext.request.contextPath }/js/jquery-1.8.3.js"></script>
<!-- 导入easyui类库 -->
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath }/js/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath }/js/easyui/themes/icon.css">
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath }/js/easyui/ext/portal.css">
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath }/css/default.css">	
<script type="text/javascript"
	src="${pageContext.request.contextPath }/js/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath }/js/easyui/ext/jquery.portal.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath }/js/easyui/ext/jquery.cookie.js"></script>
<script
	src="${pageContext.request.contextPath }/js/easyui/locale/easyui-lang-zh_CN.js"
	type="text/javascript"></script>


</script>
</head>
<body>
    <div class="container-fluid">
        <div class="row-fluid">
            <h1 align="center" >监狱点名系统demo</h1>
            

            <div align="center">
            	<form action="${pageContext.request.contextPath}/rollbooklist.action"  	>
            		 <div class="uinArea" id="uinArea">
         
						开始时间：
                	 <input type="text" id="beginTime" name="beginTime"  value="${beginTime}" class="easyui-datetimebox" />
<%--                 	 <input type="text" id="beginTime" name="beginTime"  value="${beginTime}"  class="inputstyle"/> --%>
                		结束时间：
               		<input type="text" id="endTime" name="endTime"   value="${endTime}"      class="easyui-datetimebox" />
               		<input type="submit" value="查询" style="width:60px;" class="button_blue"/>
                </div>
                <div align="center">
                ${S }
                </div>
            	</form>
            </div>
            <div class="w">
                <div class="span12">
                    <table class="table table-condensed table-bordered table-hover tab">
                        <thead>
                            <tr>
                                <th>捕获时间</th>
                                <th>姓名</th>
                                <th>捕获照片</th>
                                <th>匹配照片</th>
                                <th>匹配程度</th>
                                <!-- <th>备注</th> -->
<%--                                 <th>${aa }</th>
 --%>                            </tr>
                        </thead>
                        <tbody id="tbody">
                        <c:forEach items="${list }" var="alarm"  varStatus="a" >
                         <tr>
                                <th >${alarm.alarmTime }</th>
                                <th>${alarm.name }</th>
                                <th>   <img width="80" height="80" src="pics123/${ a.index}facePhoto.jpg"/></th>
                                <th>   <img width="80" height="80" src="pics123/${ a.index}photo.jpg"/></th>
                                <th>${alarm.score }</th>
                        </c:forEach>
                        </tbody>
                    </table>
                    <div id="page" class="tr"></div>
                </div>
            </div>
            <div id="addModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                    <h3 id="myModalLabel">添加客户</h3>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal"  id="tianjiakehu" action="${pageContext.request.contextPath }/add.action">
                        <div class="control-group">
                            <label class="control-label" for="userName">客户名称</label>
                            <div class="controls">
                                <input type="text" id="userName" name="cust_name" placeholder="客户名称">
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="Chinese">客户类型</label>
                            <div class="controls">
                                <input type="text"   name="cust_type" id="Chinese" placeholder="客户类型">
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="Math">客户电话</label>
                            <div class="controls">
                                <input type="text" id="Math"  name="cust_phone" placeholder="客户电话">
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="English">客户地址</label>
                            <div class="controls">
                                <input type="text" id="English"  name="cust_address"  placeholder="客户地址">
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="Chinese">所属用户角色</label>
                            <div class="controls">
                        	  <select id="suser" name="user.uid"   onclick="listuser()"  >
                                           <option>------所属用户角色---------</option>
								</select>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
                    <button class="btn btn-primary" id="add" onclick="baocun();">保存</button>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript">
function listuser(){

		       var url ="${pageContext.request.contextPath}/listuser.action";
		        $.post(url,function(data){
		            $(data).each(function(){
		    			var option="<option value='"+this.uid+"'>"+this.nickname+"<option/>";
		    			   $("#suser").append(option);
		            });
		        },"json");
	}
	function baocun(){
	    if ($("#userName").val() == "") {
	        alert('不能为空', '#userName');
	        return;
	    }
	    if ($("#Chinese").val() == "") {
	    	alert('不能为空');
	        return;
	    }
	    if ($("#Math").val() == "") {
	    	alert('不能为空', '#Math');
	        return;
	    }
	    if ($("#English").val() == "") {
	    	alert('不能为空', '#English');
	        return;
	    }
		
		
		$('#tianjiakehu').submit();
	}
	function deleteCustomer(d){
		
		$('#tianjiakehu').submit();
	}
	</script>
</body>
</html>